package com.hellobike.haxing.modules.product.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hellobike.haxing.common.vo.Result;
import com.hellobike.haxing.modules.product.entity.PromotionFlash;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @Description: 限时秒杀
 * @Author: haxing-boot
 * @Date:   2020-01-31
 * @Version: V1.0
 */
public interface IPromotionFlashService extends IService<PromotionFlash> {

    /**
     * 分页查询限时抢购活动下商品
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<PromotionFlash> page(Page<PromotionFlash> page, QueryWrapper<PromotionFlash> queryWrapper);

    /**
     * 新增限时抢购商品
     * @param promotionFlash
     * @return
     */
    Result savePromotionFlash(PromotionFlash promotionFlash);

    /**
     * 修改限时抢购商品
     * @param promotionFlash
     * @return
     */
    Result updatePromotionFlash(PromotionFlash promotionFlash);

    Result changeStatus(Long id, Integer status);

    /**
     * 获取限时抢购商品详细信息
     * @param id
     * @return
     */
    PromotionFlash getPromotionFlashDetail(Long id);

    Result changeFlashSkuStock(Long var1, Integer var2);
}
